import React, { Component } from 'react';
import { Scroller, Touchable } from '$yo-component';
import Header from '$component/header/index.js';
import yoHistory from '$common/history';
import './index.scss';
import Footer from '$component/footer/index.js';
import { loading } from 'yo3/component/loading';
import  Work from '../../../mock/work.json';

class DetailPage extends Component {
    render() {
        console.log(Work);
        var WorkData=[];
        WorkData=Work.map(function(item,index){
            return(
            <li className="item" key={index}>
            <time className="time">{item.time}</time>
            <div className="detail">
            <h6>公司：{item.name}({item.category});</h6>
            <ul>
            <li>职位：{item.posts};</li>
            <li>规模：{item.peoples};</li>
            <li>负责项目：{item.projects}</li>
            </ul>
            </div>
            </li>
            )

        })

        return (
            <div className="yo-flex">
                <Header title="个人工作经历"/>


                <Scroller extraClass="flex" onScroll={() => {
                }}>
                {/*
                    <Touchable onTap={() => {
                        loading.show();
                        yoHistory.goto('/')
                    }}>
                        <div className="yo-btn yo-btn-m yo-btn-light">回到首页</div>
                    </Touchable>
                */}

               
                <ul className="yo-timeline">
                    {WorkData}
                </ul>

                

                </Scroller>
                <Footer className="yo-tab yo-tab-view" />
            </div>
        )
    }
}





export default DetailPage;
